﻿@model Repository.Contracts.BanTinConClass

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Create</title>
   <script src="@Url.Content("~/Content/ckeditor/ckeditor.js")" type="text/javascript"></script>
   <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.js")" type="text/javascript"></script>
</head>
<body>
    <div>
         @using (Html.BeginForm("Create", "BanTin", FormMethod.Post, new { enctype = "multipart/form-data" }))
         {
            @Html.ValidationSummary(true)
             <div id="hiddenType" class="editor-field">
            @Html.TextBoxFor(model => model.TieuDe_VN)
             </div>
             <div id="hiddenMa" class="editor-field">
            @Html.HiddenFor(model => model.MaBanTin)
            </div>
             
             <div id="hiddenNoiDung" class="editor-field">
            @Html.HiddenFor(model => model.NoiDung_VN)
            </div>
             
             <div>
                        <textarea class="ckeditor" id="editor1" rows="10" style="width:580px; height:300px; overflow-x:hidden;"></textarea>
                    </div>
              <div style="position:relative; text-align:center">
                <input id="submit" type="submit" value="Đăng tin"/>
               </div>
        
         }
    </div>
</body>
 <script type="text/javascript">
     $(document).ready(function () {
         alert("jjj");
         $("#submit").click(function () {
             var value = CKEDITOR.instances['editor1'].getData();
             if (value == "") {

             }
             else {
                 $("#hiddenNoiDung > input").val(value);
             }
         })
     })
         
        
</script>
</html>
